import request from '@/api/request'

// 获取商品一二级分类
export const getGoodsCategorySearchFS = () =>
  request({
    url: '/goods/api/category/searchFS',
  })

// 获取购买模块的信息及权益数据
export function GetSearch() {
  return request({
    url: `/member/api/buy/module/search`,
    method: 'GET',
  })
}

// 获取商品分类
export function GetCategory(id) {
  return request({
    url: `/goods/api/category/search/cj/${id}`,
    method: 'GET',
  })
}

// 获取热卖商品
export function GetHomeRecommendingCommodities(data) {
  return request({
    url: `/goods/api/goods/search`,
    method: 'POST',
    data,
  })
}

// 获取首页商品排行
export function GetHomeGoodsSort() {
  return request({
    url: `/goods/api/category/sort`,
    method: 'GET',
  })
}

// 获取首页优惠商品
export function GetHomeDiscountGoods(data) {
  return request({
    url: `/goods/api/channel/goods/activity/search`,
    method: 'POST',
    data,
  })
}

// 获取首页导航
export function GetHomeNavigation(position) {
  return request({
    url: `/goods/api/category/navigation/${position}`,
    method: 'GET',
  })
}

// 获取首页产业信息
export function GetHomeIndustryInfo(data) {
  return request({
    url: `/goods/api/category/navigation/all`,
    method: 'POST',
    data,
  })
}

// 获取猜你喜欢商品
export function GetRecommendedProducts() {
  return request({
    url: `/goods/api/goods/like/all`,
    method: 'GET',
  })
}

export function bottomBar() {
  return request({
    url: '/business/api/bottomBar/search',
    method: 'get',
  })
}
